package com.yaoxuguang.concurrence.synchronizedpackage.variableFromInstance;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.synchronizedpackage.methodInnerVariable
 * @Description: 实例变量存在非线程安全的问题
 * @date 2018年12月18日9:58
 */
public class ThreadA extends Thread {
    private HasSelfPraviteNum hasSelfPraviteNum;

    public ThreadA(HasSelfPraviteNum hasSelfPraviteNum) {
        super();
        this.hasSelfPraviteNum = hasSelfPraviteNum;
    }

    @Override
    public void run() {
        hasSelfPraviteNum.add("a");
    }
}
